<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.4.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"kelvinzhang.gitee.io","root":"/","scheme":"Gemini","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}}};
  </script>

  <meta name="description" content="iOS 中是否存在野指针的情况？野指针野指针指向一个已删除的对象或未申请访问受限内存区域的指针。特别要指出的是野指针不是空指针。 Block一提到 Block 大家肯定都知道要说的是循环引用。在 ARC 中，如果两个对象相互持有对方，就会造成循环引用，导致内存无法释放。在 Block 中，最常用的场景则是，self 持有 block ， block 中又持有了 self 。例如下方一段代码：">
<meta property="og:type" content="article">
<meta property="og:title" content="从两道面试题说起">
<meta property="og:url" content="https://kelvinzhang.gitee.io/2019/01/26/%E4%BB%8E%E4%B8%A4%E9%81%93%E9%9D%A2%E8%AF%95%E9%A2%98%E8%AF%B4%E8%B5%B7/index.html">
<meta property="og:site_name" content="猿创日记">
<meta property="og:description" content="iOS 中是否存在野指针的情况？野指针野指针指向一个已删除的对象或未申请访问受限内存区域的指针。特别要指出的是野指针不是空指针。 Block一提到 Block 大家肯定都知道要说的是循环引用。在 ARC 中，如果两个对象相互持有对方，就会造成循环引用，导致内存无法释放。在 Block 中，最常用的场景则是，self 持有 block ， block 中又持有了 self 。例如下方一段代码：">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2019-01-26T05:58:34.000Z">
<meta property="article:modified_time" content="2021-08-26T11:56:30.567Z">
<meta property="article:author" content="Kelvin">
<meta property="article:tag" content="iOS">
<meta property="article:tag" content="面试">
<meta name="twitter:card" content="summary">

<link rel="canonical" href="https://kelvinzhang.gitee.io/2019/01/26/%E4%BB%8E%E4%B8%A4%E9%81%93%E9%9D%A2%E8%AF%95%E9%A2%98%E8%AF%B4%E8%B5%B7/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>从两道面试题说起 | 猿创日记</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">猿创日记</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-about">

    <a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于</a>

  </li>
  </ul>
</nav>




</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>
  <div class="reading-progress-bar"></div>

  <a href="https://github.com/KelvinQQ" class="github-corner" title="Follow me on GitHub" aria-label="Follow me on GitHub" rel="noopener" target="_blank"><svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://kelvinzhang.gitee.io/2019/01/26/%E4%BB%8E%E4%B8%A4%E9%81%93%E9%9D%A2%E8%AF%95%E9%A2%98%E8%AF%B4%E8%B5%B7/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="Kelvin">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="猿创日记">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          从两道面试题说起
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2019-01-26 13:58:34" itemprop="dateCreated datePublished" datetime="2019-01-26T13:58:34+08:00">2019-01-26</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2021-08-26 19:56:30" itemprop="dateModified" datetime="2021-08-26T19:56:30+08:00">2021-08-26</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/iOS/" itemprop="url" rel="index"><span itemprop="name">iOS</span></a>
                </span>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <h1 id="iOS-中是否存在野指针的情况？"><a href="#iOS-中是否存在野指针的情况？" class="headerlink" title="iOS 中是否存在野指针的情况？"></a><code>iOS</code> 中是否存在野指针的情况？</h1><h2 id="野指针"><a href="#野指针" class="headerlink" title="野指针"></a>野指针</h2><p>野指针指向一个已删除的对象或未申请访问受限内存区域的指针。特别要指出的是野指针不是空指针。</p>
<h2 id="Block"><a href="#Block" class="headerlink" title="Block"></a><code>Block</code></h2><p>一提到 <code>Block</code> 大家肯定都知道要说的是循环引用。在 <code>ARC</code> 中，如果两个对象相互持有对方，就会造成循环引用，导致内存无法释放。在 <code>Block</code> 中，最常用的场景则是，<code>self</code> 持有 <code>block</code> ， <code>block</code> 中又持有了 <code>self</code> 。例如下方一段代码：</p>
<span id="more"></span>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">@property (nonatmaic, copy) Block dataChanged;</span><br><span class="line"></span><br><span class="line">- (void)setUpModel&#123;</span><br><span class="line">  XYModel *model = [XYModel new];</span><br><span class="line">  model.dataChanged = ^(NSString *title) &#123;</span><br><span class="line">      self.titleLabel.text = title;                </span><br><span class="line">  &#125;;</span><br><span class="line">  self.model = model;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<p>上面的这段代码就会造成循环引用。那我们怎么破除呢？通常的做法都是使用 <code>weakSelf</code> 来处理，即：</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">- (void)setUpModel &#123;</span><br><span class="line">  XYModel *model = [XYModel new];</span><br><span class="line">  __weak typeof(self) weakSelf = self;</span><br><span class="line">  model.dataChanged = ^(NSString *title) &#123;</span><br><span class="line">      weakSelf.titleLabel.text = title;   </span><br><span class="line">  &#125;;</span><br><span class="line">  self.model = model;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<p>或许你还看到另外一种不是很一样的版本：</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">- (void)setUpModel &#123;</span><br><span class="line">  XYModel *model = [XYModel new];</span><br><span class="line">  __weak typeof(self) weakSelf = self;</span><br><span class="line">  model.dataChanged = ^(NSString *title) &#123;</span><br><span class="line">      __strong typeof(self) strongSelf = weakSelf;</span><br><span class="line">      strongSelf.titleLabel.text = title;   </span><br><span class="line">  &#125;;</span><br><span class="line">  self.model = model;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>对比一下，多了一个 <code>strongSelf</code> 。那为什么又要多加一个 <code>strongSelf</code> 呢？</p>
<p>考虑一下下面的代码，</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">__weak __typeof__(self) weakSelf = self;</span><br><span class="line">dispatch_group_async(_operationsGroup, _operationsQueue, ^&#123;</span><br><span class="line">  [weakSelf doSomething];</span><br><span class="line">  [weakSelf doSomethingElse];</span><br><span class="line">&#125;);</span><br></pre></td></tr></table></figure>

<p>在 <code>doSomething</code> 时， <code>weakSelf</code> 不会被释放，但是在 <code>doSomethingElse</code> 时，<code>weakSelf</code> 有可能被释放。</p>
<p>这个时候就遇到了野指针问题，回答了一开始的题目。</p>
<p>在这里就需要用到 <code>strongSelf</code> ，使用 <code>__strong</code> 确保在 <code>Block</code> 内， <code>strongSelf</code> 不会被释放。</p>
<h2 id="小结"><a href="#小结" class="headerlink" title="小结"></a>小结</h2><ul>
<li><p>在使用 <code>Block</code> 时，如遇到循环引用问题，可以使用 <code>__weak</code> 来破除循环引用。</p>
</li>
<li><p>如果在 <code>Block</code> 内需要多次访问 <code>__weak</code> 变量，则需要使用 <code>__strong</code> 来保持变量不会被释放。</p>
</li>
</ul>
<h1 id="SDWebImage-中为什么要解码图片"><a href="#SDWebImage-中为什么要解码图片" class="headerlink" title="SDWebImage 中为什么要解码图片"></a><code>SDWebImage</code> 中为什么要解码图片</h1><p>要说明这么问题我们需要先了解一下在 <code>iOS</code> 中，图片显示的流程。</p>
<blockquote>
<p>概括来说，从磁盘中加载一张图片，并将它显示到屏幕上，中间的主要工作流如下：</p>
<p>假设我们使用 <code>imageWithContentsOfFile: </code>方法从磁盘中加载一张图片，这个时候的图片并没有解压缩；</p>
<p>然后将生成的 <code>UIImage</code> 赋值给 <code>UIImageView</code> ；</p>
<p>接着一个隐式的 <code>CATransaction</code> 捕获到了 <code>UIImageView</code> 图层树的变化；</p>
<p>在主线程的下一个 <code>run loop</code> 到来时，<code>Core Animation</code> 提交了这个隐式的 <code>transaction</code> ，这个过程可能会对图片进行 <code>copy</code>  操作，而受图片是否字节对齐等因素的影响，这个 <code>copy</code> 操作可能会涉及以下部分或全部步骤：</p>
<ul>
<li>分配内存缓冲区用于管理文件 <code>IO</code> 和解压缩操作；</li>
<li>将文件数据从磁盘读到内存中；</li>
<li>将压缩的图片数据解码成未压缩的位图形式，这是一个非常耗时的 <code>CPU</code> 操作；</li>
<li>最后 <code>Core Animation</code> 使用未压缩的位图数据渲染 <code>UIImageView</code> 的图层。</li>
</ul>
<p>在上面的步骤中，我们提到了图片的解压缩是一个非常耗时的 <code>CPU</code> 操作，并且它默认是在主线程中执行的。那么当需要加载的图片比较多时，就会对我们应用的响应性造成严重的影响，尤其是在快速滑动的列表上，这个问题会表现得更加突出。</p>
</blockquote>
<p>这里顺便提一下 <code>imageNamed:</code> 和 <code>imageWithContentsOfFile:</code> 的区别，这两个 <code>API</code> 都需要解码，并且工作流程都是一致的。不过<code>imageNamed:</code>会做缓存处理，在下一次用到相同的资源时，就会从缓存里面读取。而 <code>imageWithContentsOfFile:</code> 则不会。所以网上大多文章都会告诉你，多次使用的小图片使用 <code>imageNamed:</code> 加载，一次性使用的大图片使用 <code>imageWithContentsOfFile:</code> 加载。</p>
<p>对于上面引用的流程中最后提到，当有大量图片滑动时就会造成主线程的卡顿，原因就是解码图片在主线程中操作的。那有什么办法避免呢？<br>我在查询关于这个问题的相关资料时，发现有些博客给出了2种方案：</p>
<blockquote>
<ol>
<li><p>我们不使用<code>imageNamed:</code>加载图片，使用其他的方法，比如<code>imageWithContentsOfFile:</code></p>
</li>
<li><p>我们自己解码图片，可以把这个解码过程放到子线程</p>
</li>
</ol>
</blockquote>
<p>其实第一种方式没法避免卡顿。这就引出了为什么 <code>SDWebImage</code>中需要自己解码图片。</p>
<blockquote>
<p>在我们使用 <code>UIImage</code> 的时候，创建的图片通常不会直接加载到内存，而是在渲染的时候再进行解压并加载到内存。这就会导致 <code>UIImage</code> 在渲染的时候效率上不是那么高效。为了提高效率通过 <code>decodedImageWithImage</code> 方法把图片提前解压加载到内存，这样这张新图片就不再需要重复解压了，提高了渲染效率。这是一种空间换时间的做法。</p>
</blockquote>
<h4 id="参考文章："><a href="#参考文章：" class="headerlink" title="参考文章："></a>参考文章：</h4><ol>
<li><a target="_blank" rel="noopener" href="http://blog.lessfun.com/blog/2014/11/22/when-should-use-weakself-and-strongself-in-objc-block/">到底什么时候才需要在ObjC的Block中使用weakSelf/strongSelf
</a> 浮生猎趣</li>
<li><a target="_blank" rel="noopener" href="http://blog.leichunfeng.com/blog/2017/02/20/talking-about-the-decompression-of-the-image-in-ios/#jtss-tsina">谈谈 iOS 中图片的解压缩</a> 雷纯锋的技术博客</li>
<li><a target="_blank" rel="noopener" href="https://www.jianshu.com/p/dfa47380fc05">SDWebImage源码解析（三）——SDWebImage图片解码/压缩模块</a> SHY圆圆圈圈圆圆</li>
</ol>

    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/iOS/" rel="tag"># iOS</a>
              <a href="/tags/%E9%9D%A2%E8%AF%95/" rel="tag"># 面试</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2019/01/26/Flutter%E5%88%9D%E4%BD%93%E9%AA%8C/" rel="prev" title="Flutter初体验">
      <i class="fa fa-chevron-left"></i> Flutter初体验
    </a></div>
      <div class="post-nav-item">
    <a href="/2019/01/26/%E5%9C%A8%E5%B0%8F%E7%A8%8B%E5%BA%8F%E4%B8%AD%E9%9B%86%E6%88%90%E8%B5%9E%E8%B5%8F/" rel="next" title="在小程序中集成赞赏">
      在小程序中集成赞赏 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#iOS-%E4%B8%AD%E6%98%AF%E5%90%A6%E5%AD%98%E5%9C%A8%E9%87%8E%E6%8C%87%E9%92%88%E7%9A%84%E6%83%85%E5%86%B5%EF%BC%9F"><span class="nav-number">1.</span> <span class="nav-text">iOS 中是否存在野指针的情况？</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E9%87%8E%E6%8C%87%E9%92%88"><span class="nav-number">1.1.</span> <span class="nav-text">野指针</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Block"><span class="nav-number">1.2.</span> <span class="nav-text">Block</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%B0%8F%E7%BB%93"><span class="nav-number">1.3.</span> <span class="nav-text">小结</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#SDWebImage-%E4%B8%AD%E4%B8%BA%E4%BB%80%E4%B9%88%E8%A6%81%E8%A7%A3%E7%A0%81%E5%9B%BE%E7%89%87"><span class="nav-number">2.</span> <span class="nav-text">SDWebImage 中为什么要解码图片</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#%E5%8F%82%E8%80%83%E6%96%87%E7%AB%A0%EF%BC%9A"><span class="nav-number">2.0.0.1.</span> <span class="nav-text">参考文章：</span></a></li></ol></li></ol></li></ol></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
  <p class="site-author-name" itemprop="name">Kelvin</p>
  <div class="site-description" itemprop="description"></div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives">
          <span class="site-state-item-count">57</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
        <span class="site-state-item-count">11</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
        <span class="site-state-item-count">56</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author motion-element">
      <span class="links-of-author-item">
        <a href="https://github.com/KelvinQQ" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;KelvinQQ" rel="noopener" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a>
      </span>
      <span class="links-of-author-item">
        <a href="mailto:history_zq@163.com" title="E-Mail → mailto:history_zq@163.com" rel="noopener" target="_blank"><i class="fa fa-envelope fa-fw"></i>E-Mail</a>
      </span>
  </div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2021</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Kelvin</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Gemini</a> 强力驱动
  </div>

        








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/pisces.js"></script>


<script src="/js/next-boot.js"></script>




  















  

  

<script src="/live2dw/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({"pluginRootPath":"live2dw/","pluginJsPath":"lib/","pluginModelPath":"assets/","tagMode":false,"log":false,"model":{"jsonPath":"live2d-widget-models\\packages\\live2d-widget-model-miku"},"display":{"position":"right","width":150,"height":300},"mobile":{"show":true}});</script></body>
</html>
